﻿[assembly: System.Web.UI.WebResource("BM.Tools.WebControls.MForm.Controls.Additions.DataTypeConstraint.js", "application/x-javascript")]
[assembly: System.Web.UI.WebResource("BM.Tools.WebControls.MForm.Controls.Additions.DataTypeConstraint.debug.js", "application/x-javascript")]
[assembly: System.Web.UI.ScriptResource("BM.Tools.WebControls.MForm.Controls.Additions.DataTypeConstraint.js", "BM.Tools.WebControls.MForm.Resources.DataTypeResource", "BM.DataTypes")]

namespace BM.Tools.WebControls.MForm.Controls.Additions
{
    using System.ComponentModel;
    using System.Web.UI;
    using AjaxControlToolkit;
    using BM.Tools.WebControls.MForm.Controls.Items;

    /// <summary>
    /// A constraint that checks the correctness of the item's value against its data type 
    /// </summary>
    [DesignTimeVisible(false)]
    [ParseChildren(true)]
    [ClientScriptResource("BM.Tools.WebControls.MForm", "BM.Tools.WebControls.MForm.Controls.Additions.DataTypeConstraint.js")]    
    public class DataTypeConstraint : Constraint
    {
        /// <summary>
        /// Gets information whether the constraint was met.
        /// </summary>
        /// <param name="item">
        /// The item on which the constraint is checked.
        /// </param>
        /// <returns>
        /// was the constraint met
        /// </returns>
        public override bool IsValid(OffspringItem item)
        {
            return true;
        }
    }
}
